import request from '@/utils/request'
export function list(page,size){
	return request({
		url: '/equipment/list',
		method: 'post',
		params:{
			page: page,
			size: size
		}
	})
}

export function update(data){
	return request({
		url: '/equipment/update',
		method: 'post',
		data
	})
}

export function del(data){
	return request({
		url: '/equipment/delete',
		method: 'post',
		data
	})
}

export function search(formline,pageSize,currentPage){
	return request({
		url: '/equipment/search',
		method:'post',
		params:{
			ipaddress: formline.ipAddress,
			hostname: formline.hostName,
			equipmenttype: formline.equipmentType,
			idcid: formline.idcid,
			size: pageSize,
			page: currentPage
		}
	})
}

export function listequipment(){
	return request({
		url: '/equipment/listall',
		method:'post'
	})
}

export function listequimentType(){
	return {
		"0": "物理服务器",
		"1": "虚拟服务器",
		"2": "交换机"
	}
}

export function listoperationsystemType(){
	return {
		"0": "Linux",
		"1": "Windows"
	}
}